import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';

import { BaseService } from '../../base.service';

export interface GenerateConfig {
  id: number;
  name: string;
  filepath: string;
  projectid: number;
  adduserid: number;
}

@Injectable({
  providedIn: 'root'
})
export class GenerateConfigService extends BaseService<GenerateConfig> {
  constructor() {
    super();
    this.apiPrefix = 'GenerateConfig';
  }

  public checkFilePathExist(filePath: string): Observable<boolean> {
    return this.http.get(`/${this.apiPrefix}/filePathExist?filePath=${filePath}`);
  }
}
